#include "OsComponentFactory.hpp"

#include "OsConfig.hpp"

#include "ConsoleFactory.hpp"
#include "ErrorFactory.hpp"
#include "ProcessFactory.hpp"
#include "RegeditFactory.hpp"
#include "SyslogFactory.hpp"
#include "SyslogInstallerFactory.hpp"

#include <memory>

using namespace odo;

void OsComponentFactory::beforeComponentFactory() {
	// void
}

void OsComponentFactory::afterComponentFactory() {
	// void
}

std::auto_ptr<ConsoleIF> OsComponentFactory::getConsole() {
	ConsoleFactory<static_cast<unsigned>(ODO_CHOSEN_OS)> consoleFactory;
	return getComponent<ConsoleIF>(consoleFactory);
}

std::auto_ptr<ErrorIF> OsComponentFactory::getError() {
	ErrorFactory<static_cast<unsigned>(ODO_CHOSEN_OS)> errorFactory;
	return getComponent<ErrorIF>(errorFactory);
}

std::auto_ptr<ProcessIF> OsComponentFactory::getProcess() {
	ProcessFactory<static_cast<unsigned>(ODO_CHOSEN_OS)> processFactory;
	return getComponent<ProcessIF>(processFactory);
}

std::auto_ptr<RegeditIF> OsComponentFactory::getRegedit() {
	RegeditFactory<static_cast<unsigned>(ODO_CHOSEN_OS)> regeditFactory;
	return getComponent<RegeditIF>(regeditFactory);
}

std::auto_ptr<SyslogIF> OsComponentFactory::getSyslog() {
	SyslogFactory<static_cast<unsigned>(ODO_CHOSEN_OS)> syslogFactory;
	return getComponent<SyslogIF>(syslogFactory);
}

std::auto_ptr<SyslogInstallerIF> OsComponentFactory::getSyslogInstaller() {
	SyslogInstallerFactory<static_cast<unsigned>(ODO_CHOSEN_OS)> syslogInstallerFactory;
	return getComponent<SyslogInstallerIF>(syslogInstallerFactory);
}

OsComponentFactory::~OsComponentFactory() {
	// void
}

OsComponentFactory::OsComponentFactory() {
	// void
}
